package com.ryskoo.basicdata.mallinfo.repository;

import com.ryskoo.basicdata.mallinfo.domain.MallInfoPO;
import com.ryskoo.common.constant.CacheConstant;
import com.ryskoo.framework.core.repository.BasicRedisImpl;
import com.ryskoo.framework.core.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;

/**
 * @author BeHappy
 */
@Primary
@Repository
public class MallInfoRedisImpl extends BasicRedisImpl<MallInfoPO> implements IMallInfoRepository{
    @Autowired
    private RedisUtil redisClient;

    @Autowired
    private IMallInfoRepository mallInfoRepository;

    @PostConstruct
    public void init() {
        this.setRedisClient(redisClient);
        this.setDao(mallInfoRepository);
    }

    public MallInfoRedisImpl() {
        super(CacheConstant.BDS_MALLINFO_KEY);
    }
}
